<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
 lang="en" dir="ltr">
<head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><link rel="stylesheet" href="../codebase/default.css" type="text/css" media="screen" title="no title" charset="utf-8"><title>
    dhtmlxtree:api_constructor_object    [Skin test wiki]
  </title></head>

<body>
<div class="dokuwiki">
  
  <div class="stylehead">

    <div class="header">
    <a class="logo" href="http://dhtmlx.com" title="DHTMLX Documentation homepage"></a>
    <span class="tittle-dhtmlx">DHTMLX Docs & Samples Explorer</span>

    <div class="search-field">
        <form action="http://dhtmlx.com/dhxdocs/doku.php" accept-charset="utf-8" id="dw__search"><div class="no"><input type="hidden" name="do" value="search" /><input type="text" id="qsearch__in" accesskey="f" name="id" title="Search" /><button type="submit"></button><div id="qsearch__out" class="ajax_qsearch JSpopup"></div></div></form>    </div>
        <div class="buttons">
                <a class="doc"></a>
                <a title="DHTMLX Samples homepage" href="../samples.html" class="sample"/></a>
        </div>
     <!-- <div class="pagename">
        [[<a href="#"  title="Backlinks">dhtmlxtree:api_constructor_object</a>]]
      </div>
      <div class="logo">
        <a href="/dhtmlx/_lab/wiki/doku.php"  name="dokuwiki__top" id="dokuwiki__top" accesskey="h" title="[H]">Skin test wiki</a>      </div>

      <div class="clearer"></div>-->
        
    </div>

    
<!--   <div class="bar" id="bar__top">
      <div class="bar-left" id="bar__topleft">
                <form class="button btn_revs" method="get" action="http://dhtmlx.com/dhxdocs/doku.php"><div class="no"><input type="hidden" name="do" value="revisions" /><input type="hidden" name="id" value="dhtmlxtree:api_constructor_object" /><input type="submit" value="Old revisions" class="button" accesskey="o" title="Old revisions [O]" /></div></form>      </div>

      <div class="bar-right" id="bar__topright">
        <form class="button btn_recent" method="get" action="http://dhtmlx.com/dhxdocs/doku.php"><div class="no"><input type="hidden" name="do" value="recent" /><input type="hidden" name="id" value="dhtmlxtree:api_constructor_object" /><input type="submit" value="Recent changes" class="button" accesskey="r" title="Recent changes [R]" /></div></form>        <form action="http://dhtmlx.com/dhxdocs/doku.php" accept-charset="utf-8" id="dw__search"><div class="no"><input type="hidden" name="do" value="search" /><input type="text" id="qsearch__in" accesskey="f" name="id" title="Search" /><button type="submit"></button><div id="qsearch__out" class="ajax_qsearch JSpopup"></div></div></form>&nbsp;
      </div>

      <div class="clearer"></div>
    </div> -->

<!--        <div class="breadcrumbs">
      <span class="bchead">Trace:</span> <span class="bcsep">&raquo;</span> <span class="curid"><a href="/dhtmlx/_lab/wiki/doku.php?id=dhtmlxtree:api_constructor_object"  class="breadcrumbs" title="dhtmlxtree:api_constructor_object">api_constructor_object</a></span>    </div>
    -->

    
  </div>
  
  
  <div class="page">
    <!-- wikipage start -->
    <!-- TOC START -->
<div class="toc">
<div class="tocheader toctoggle" id="toc__header">Table of Contents</div>
<div id="toc__inside">

<ul class="toc">
<li class="clear">

<ul class="toc">
<li class="level2"><div class="li"><span class="li"><a href="#list_of_initialization_properties" class="toc">List of initialization properties</a></span></div>
<ul class="toc">
<li class="level3"><div class="li"><span class="li"><a href="#common_initialization_options" class="toc">Common initialization options</a></span></div></li>
<li class="level3"><div class="li"><span class="li"><a href="#drag_and_drop" class="toc">Drag and Drop</a></span></div></li>
<li class="level3"><div class="li"><span class="li"><a href="#extensions" class="toc">Extensions</a></span></div></li>
<li class="level3"><div class="li"><span class="li"><a href="#events" class="toc">Events</a></span></div></li></ul>
</li></ul>
</li></ul>
</div>
</div>
<!-- TOC END -->

<p>
<div class='backlinks'><div class='backlink last_backlink'><img src="icons___file.gif"  class="media" alt="" /><a href="../index.html" class="wikilink1" title="start">Index</a></div><div class='arrow'></div><div class='backlink last_backlink'><img src="icons___tree.gif"  class="media" alt="" /><a href="index.html" class="wikilink1" title="dhtmlxtree:toc">dhtmlxtree</a></div><div class='arrow'></div><div class='backlink'><span class="curid"><a href="dhtmlxtree___api_constructor_object.html" class="wikilink1" title="dhtmlxtree:api_constructor_object"> List of initialization properties </a></span></div></div>

</p>

<h2><a name="list_of_initialization_properties" id="list_of_initialization_properties">List of initialization properties</a></h2>
<div class="level2">

</div>

<h3><a name="common_initialization_options" id="common_initialization_options">Common initialization options</a></h3>
<div class="level3">
<ul>
<li class="level1"><div class="li"> parent - string or object, id of container, where tree will be initialized, <strong>mandatory</strong></div>
</li>
<li class="level1"><div class="li"> image_path - string, path to image folder, which will be used for icons in tree</div>
</li>
<li class="level1"><div class="li"> width - {string} width of tree, can be defined in pixels or in percents</div>
</li>
<li class="level1"><div class="li"> height - {string} height of tree, can be defined in pixels or in percents</div>
</li>
<li class="level1"><div class="li"> root_id - {string} id of virtual root item</div>
</li>
</ul>
<ul>
<li class="level1"><div class="li"> checkbox - {boolean}, show/hide checkboxes (all checkboxes in tree) ( <a href="dhtmlxtree___api_method_dhtmlxtreeobject_enablecheckboxes.html" class="wikilink1" title="dhtmlxtree:api_method_dhtmlxtreeobject_enablecheckboxes">enableCheckBoxes</a> )</div>
</li>
<li class="level1"><div class="li"> checkbox_3_state - {boolean}, enable three state checkboxes ( <a href="dhtmlxtree___api_method_dhtmlxtreeobject_enablethreestatecheckboxes.html" class="wikilink1" title="dhtmlxtree:api_method_dhtmlxtreeobject_enablethreestatecheckboxes">enableThreeStateCheckboxes</a> )</div>
</li>
<li class="level1"><div class="li"> context_menu - context menu object, enable context menu  ( <a href="dhtmlxtree___api_method_dhtmlxtreeobject_enablecontextmenu.html" class="wikilink1" title="dhtmlxtree:api_method_dhtmlxtreeobject_enablecontextmenu">enableContextMenu</a> )</div>
</li>
<li class="level1"><div class="li"> multiline - {boolean}, enable multi line items ( <a href="dhtmlxtree___api_method_dhtmlxtreeobject_enablemultilineitems.html" class="wikilink1" title="dhtmlxtree:api_method_dhtmlxtreeobject_enablemultilineitems">enableMultiLineItems</a> )</div>
</li>
<li class="level1"><div class="li"> multiselect - {boolean}, enable multiselection ( <a href="dhtmlxtree___api_method_dhtmlxtreeobject_enablemultiselection.html" class="wikilink1" title="dhtmlxtree:api_method_dhtmlxtreeobject_enablemultiselection">enableMultiselection</a> )</div>
</li>
<li class="level1"><div class="li"> editor - {boolean}, enable editing of item text ( <a href="dhtmlxtree___api_method_dhtmlxtreeobject_enableitemeditor.html" class="wikilink1" title="dhtmlxtree:api_method_dhtmlxtreeobject_enableitemeditor">enableItemEditor</a> )</div>
</li>
<li class="level1"><div class="li"> hover - {boolean}, enable item highlighting (item text highlited on mouseover) ( <a href="dhtmlxtree___api_method_dhtmlxtreeobject_enablehighlighting.html" class="wikilink1" title="dhtmlxtree:api_method_dhtmlxtreeobject_enablehighlighting">enableHighlighting</a> )</div>
</li>
<li class="level1"><div class="li"> smart_parsing - {boolean}, enable/disable smart <acronym title="Extensible Markup Language">XML</acronym> parsing mode (usefull for big, well structured <acronym title="Extensible Markup Language">XML</acronym>) ( <a href="dhtmlxtree___api_method_dhtmlxtreeobject_enablesmartxmlparsing.html" class="wikilink1" title="dhtmlxtree:api_method_dhtmlxtreeobject_enablesmartxmlparsing">enableSmartXMLParsing</a> )</div>
</li>
<li class="level1"><div class="li"> xml - {string}, url of data xml file </div>
</li>
</ul>

</div>

<h3><a name="drag_and_drop" id="drag_and_drop">Drag and Drop</a></h3>
<div class="level3">
<ul>
<li class="level1"><div class="li"> drag - {boolean}, enable/disable drag-and-drop ( <a href="dhtmlxtree___api_method_dhtmlxtreeobject_enabledraganddrop.html" class="wikilink1" title="dhtmlxtree:api_method_dhtmlxtreeobject_enabledraganddrop">enableDragAndDrop</a> )</div>
</li>
<li class="level1"><div class="li"> drag_copy - {boolean}, enable drag without removing (copy instead of move) ( <a href="dhtmlxtree___api_method_dhtmlxtreeobject_enablemercydrag.html" class="wikilink1" title="dhtmlxtree:api_method_dhtmlxtreeobject_enablemercydrag">enableMercyDrag</a> )</div>
</li>
<li class="level1"><div class="li"> drag_image - {boolean}, enable draging item image with item text ( <a href="dhtmlxtree___api_method_dhtmlxtreeobject_enableimagedrag.html" class="wikilink1" title="dhtmlxtree:api_method_dhtmlxtreeobject_enableimagedrag">enableImageDrag</a> )</div>
</li>
<li class="level1"><div class="li"> drag_scroll - {boolean}, enable/disable auto scrolling while drag-and-drop ( <a href="dhtmlxtree___api_method_dhtmlxtreeobject_enabledraganddropscrolling.html" class="wikilink1" title="dhtmlxtree:api_method_dhtmlxtreeobject_enabledraganddropscrolling">enableDragAndDropScrolling</a> )</div>
</li>
</ul>

</div>

<h3><a name="extensions" id="extensions">Extensions</a></h3>
<div class="level3">
<ul>
<li class="level1"><div class="li"> auto_save_selected - {boolean}, enable/disable autosaving selected node in cookie ( <a href="dhtmlxtree___api_method_dhtmlxtreeobject_enableautosavingselected.html" class="wikilink1" title="dhtmlxtree:api_method_dhtmlxtreeobject_enableautosavingselected">enableAutoSavingSelected</a> )</div>
</li>
<li class="level1"><div class="li"> auto_tooltip - {boolean}, enable auto tooltips (node text as tooltip) ( <a href="dhtmlxtree___api_method_dhtmlxtreeobject_enableautotooltips.html" class="wikilink1" title="dhtmlxtree:api_method_dhtmlxtreeobject_enableautotooltips">enableAutoTooltips</a> )</div>
</li>
<li class="level1"><div class="li"> checkbox_smart - {boolean}, enable smart checkboxes ,true by default (auto checking children and parents for 3-state checkboxes) ( <a href="dhtmlxtree___api_method_dhtmlxtreeobject_enablesmartcheckboxes.html" class="wikilink1" title="dhtmlxtree:api_method_dhtmlxtreeobject_enablesmartcheckboxes">enableSmartCheckboxes</a> )</div>
</li>
<li class="level1"><div class="li"> distributed_parsing - {boolean}, enable distributed parsing of big tree (items loaded portion by portion with some timeouts) ( <a href="dhtmlxtree___api_method_dhtmlxtreeobject_enabledistributedparsing.html" class="wikilink1" title="dhtmlxtree:api_method_dhtmlxtreeobject_enabledistributedparsing">enableDistributedParsing</a> )</div>
</li>
<li class="level1"><div class="li"> images - {boolean}, enable tree images ( <a href="dhtmlxtree___api_method_dhtmlxtreeobject_enabletreeimages.html" class="wikilink1" title="dhtmlxtree:api_method_dhtmlxtreeobject_enabletreeimages">enableTreeImages</a> )</div>
</li>
<li class="level1"><div class="li"> image_fix - {boolean}, replace IMG tag with background images - solve problem with <acronym title="Internet Explorer">IE</acronym> image caching , not works for <acronym title="Internet Explorer 6">IE6</acronym> SP1 ( <a href="dhtmlxtree___api_method_dhtmlxtreeobject_enableieimagefix.html" class="wikilink1" title="dhtmlxtree:api_method_dhtmlxtreeobject_enableieimagefix">enableIEImageFix</a> )</div>
</li>
<li class="level1"><div class="li"> lines - {boolean}, enable/disable tree lines (parent-child threads) ( <a href="dhtmlxtree___api_method_dhtmlxtreeobject_enabletreelines.html" class="wikilink1" title="dhtmlxtree:api_method_dhtmlxtreeobject_enabletreelines">enableTreeLines</a> )</div>
</li>
<li class="level1"><div class="li"> loading_item - {boolean}, enable/disable “Loading…” item ( <a href="dhtmlxtree___api_method_dhtmlxtreeobject_enableloadingitem.html" class="wikilink1" title="dhtmlxtree:api_method_dhtmlxtreeobject_enableloadingitem">enableLoadingItem</a> )</div>
</li>
<li class="level1"><div class="li"> navigation - {boolean}, enable keyboard navigation in tree ( <a href="dhtmlxtree___api_method_dhtmlxtreeobject_enablekeyboardnavigation.html" class="wikilink1" title="dhtmlxtree:api_method_dhtmlxtreeobject_enablekeyboardnavigation">enableKeyboardNavigation</a> )</div>
</li>
<li class="level1"><div class="li"> radio - {boolean}, replace checkboxes with radio buttons ( <a href="dhtmlxtree___api_method_dhtmlxtreeobject_enableradiobuttons.html" class="wikilink1" title="dhtmlxtree:api_method_dhtmlxtreeobject_enableradiobuttons">enableRadioButtons</a> )</div>
</li>
<li class="level1"><div class="li"> radio_single - {boolean}, replace checkboxes with radio buttons ( <a href="dhtmlxtree___api_method_dhtmlxtreeobject_enablesingleradiomode.html" class="wikilink1" title="dhtmlxtree:api_method_dhtmlxtreeobject_enablesingleradiomode">enableSingleRadioMode</a> )</div>
</li>
<li class="level1"><div class="li"> rtl - {boolean}, enables Right-to-Left mode in tree ( <a href="dhtmlxtree___api_method_dhtmlxtreeobject_enablertl.html" class="wikilink1" title="dhtmlxtree:api_method_dhtmlxtreeobject_enablertl">enableRTL</a> )</div>
</li>
<li class="level1"><div class="li"> search - {boolean}, enable search items by pressing keys (any item in tree should be focused/selected to make search work) ( <a href="dhtmlxtree___api_method_dhtmlxtreeobject_enablekeysearch.html" class="wikilink1" title="dhtmlxtree:api_method_dhtmlxtreeobject_enablekeysearch">enableKeySearch</a> )</div>
</li>
<li class="level1"><div class="li"> smart_rendering - {boolean}, enables smart rendering mode (usefull for big trees with lots f items on each level) ( <a href="dhtmlxtree___api_method_dhtmlxtreeobject_enablesmartrendering.html" class="wikilink1" title="dhtmlxtree:api_method_dhtmlxtreeobject_enablesmartrendering">enableSmartRendering</a> )</div>
</li>
<li class="level1"><div class="li"> text_icons - {boolean}, replace images with text signs ( <a href="dhtmlxtree___api_method_dhtmlxtreeobject_enabletextsigns.html" class="wikilink1" title="dhtmlxtree:api_method_dhtmlxtreeobject_enabletextsigns">enableTextSigns</a> )</div>
</li>
</ul>

</div>

<h3><a name="events" id="events">Events</a></h3>
<div class="level3">

<p>
any event can be assigned by using property equal to event name
</p>
<pre class="code javascript">	tree <span class="sy0">=</span> <span class="kw2">new</span> dhtmlXTreeObject<span class="br0">&#40;</span><span class="br0">&#123;</span>
		parent<span class="sy0">:</span><span class="st0">&quot;a_tree&quot;</span><span class="sy0">,</span>
		onClick<span class="sy0">:</span><span class="kw2">function</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#123;</span>
			<span class="kw3">alert</span><span class="br0">&#40;</span><span class="st0">&quot;I'm clicked&quot;</span><span class="br0">&#41;</span>;	
		<span class="br0">&#125;</span>
	<span class="br0">&#125;</span><span class="br0">&#41;</span>;</pre>
</div>

    <!-- wikipage stop -->
  </div>

  <div class="clearer">&nbsp;</div>

  
  <div class="stylefoot">

    <div class="meta">
      <div class="user">
              </div>
     <!-- <div class="doc">
        dhtmlxtree/api_constructor_object.txt &middot; Last modified: 2009/07/30 12:56 (external edit)      </div>
    </div>-->

   
    <!--<div class="bar" id="bar__bottom">-->
      <!--<div class="bar-left" id="bar__bottomleft">-->
        <!---->
        <!--<form class="button btn_revs" method="get" action="http://dhtmlx.com/dhxdocs/doku.php"><div class="no"><input type="hidden" name="do" value="revisions" /><input type="hidden" name="id" value="dhtmlxtree:api_constructor_object" /><input type="submit" value="Old revisions" class="button" accesskey="o" title="Old revisions [O]" /></div></form>-->
      <!--</div>-->
      <!--<div class="bar-right" id="bar__bottomright">-->
        <!---->
        <!---->
        <!---->
        <!---->
        <!--<form class="button btn_login" method="get" action="http://dhtmlx.com/dhxdocs/doku.php"><div class="no"><input type="hidden" name="do" value="login" /><input type="hidden" name="sectok" value="4b11f79237d6d098bf9b86d288052ab0" /><input type="hidden" name="id" value="dhtmlxtree:api_constructor_object" /><input type="submit" value="Login" class="button" title="Login" /></div></form>-->
        <!--<form class="button btn_index" method="get" action="http://dhtmlx.com/dhxdocs/doku.php"><div class="no"><input type="hidden" name="do" value="index" /><input type="hidden" name="id" value="dhtmlxtree:api_constructor_object" /><input type="submit" value="Index" class="button" accesskey="x" title="Index [X]" /></div></form>-->
        <!--<a class="nolink" href="#dokuwiki__top"><input type="button" class="button" value="Back to top" onclick="window.scrollTo(0, 0)" title="Back to top" /></a>&nbsp;-->
      <!--</div>-->
      <!--<div class="clearer"></div>-->
    <!--</div>-->

  </div>

  

</div>

<div class="footerinc">


</div>

<div class="no"><img src="/dhtmlx/_lab/wiki/lib/exe/indexer.php?id=dhtmlxtree%3Aapi_constructor_object&amp;1257950425" width="1" height="1" alt=""  /></div>
     <div class="footer">
        <div class="footer-logo"></div>
        <div class="copyright">Copyright © 1998-2009 DHTMLX LTD.<br />All rights reserved.</div>
            	    </div>
</body>
</html>
